package org.example.design.facade.test2;

import org.example.util.Function;

/**
 * @author huangshen
 * @version 0
 * @description Brain
 * @since 2022/2/10 16:57
 */
public class Brain {

    /**
     * 话语
     */
    private String words;

    /**
     * 把话语记录大脑，别人说了话就设置true，反之false
     */
    public boolean sendWordsInBrain(String words){
        this.words = words;
        return !Function.equalsNull(words);
    }

    /**
     * 分析话语
     */
    public void explainWords(){
        //模拟分析过程
        try {
            System.out.println("正在分析对方说的话是什么意思......");
            Thread.sleep(5000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("额，原来你是这个意思！！");
    }
}

